package com.ymatou.iapi.anlisettlement.bean;

public enum AnliProductTypeEnum {
	
	// 普通商品
	NORMAL_PRODUCT(1),

	// 安利会员
	ANLI_MEMBER(2),

	// 海淘达人
	DAREN_MEMBER(3);
	
	private int code;

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}
	
	private AnliProductTypeEnum(int code) {
		this.code = code;
	}
	
	public static AnliProductTypeEnum findEnumByOrderType(int orderType) {
		
		switch(orderType) {
		case 0:
			return AnliProductTypeEnum.NORMAL_PRODUCT;
		case 2:
			return AnliProductTypeEnum.ANLI_MEMBER;
		case 3:
			return AnliProductTypeEnum.DAREN_MEMBER;
		default:
			return AnliProductTypeEnum.NORMAL_PRODUCT;
		}
	}
}
